<template lang="pug">
  .wechat-tips(v-show="wechatTipShow",@click="toggle")
    | 点击右上角 选择淘宝 或浏览器打开
    img(:src="backIcon")
</template>
<script>
import backIcon from '../assets/help/arrow-wechat.svg'
import Window from '../helpers/window'
export default {
  name: 'WechatTip',
  data () {
    return {
      backIcon: backIcon,
      wechatTipShow: false
    }
  },
  methods: {
    toggle () {
      if (this.wechatTipShow) {
        this.wechatTipShow = false
      } else {
        this.wechatTipShow = true
        Window.scrollTop()
      }
    }
  }
}
</script>
<style lang="sass">
@import '../styles/color.sass';
.wechat-tips
  padding: 10px 10px 20px 10px
  background: $orange
  color: $white
  text-align: right
</style>
